package com.xuecheng.media.service;

import com.xuecheng.commons.model.dto.MediaDto;
import com.xuecheng.commons.model.dto.MediaQueryDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.dto.VodUploadDto;
import com.xuecheng.commons.model.vo.ResourceVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.media.domain.Media;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 媒资信息 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-07-21
 */
public interface MediaService extends IService<Media> {

    ResponseResult createToken(VodUploadDto dto) throws Exception;

    ResponseResult refreshToken(String videoId) throws Exception;

    ResponseResult saveMedia(MediaDto dto) throws Exception;


    ResponseResult findMediaList(PageRequest request, MediaQueryDto dto);

    ResponseResult previewMediaById(Long mediaId) throws Exception;

    ResponseResult deleteMediaById(Long mediaId);

    ResponseResult<ResourceVo> findMediaUrl(Long mediaId) throws Exception;
}
